﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

using FanaticToy.Core.IdentifierStrategy;

namespace FanaticToy.Core.Configure
{
    [SoapInclude(typeof(FileSystemLevel1FormatToyStrategy))]
    [SoapInclude(typeof(FileSystemLevel2FormatToyStrategy))]
    public abstract class BaseToyStrategy
    {
        public virtual bool IsMatched(string path)
        {
            return true;
        }

        public virtual IEnumerable<string> GetAvaliablePaths(string basePath)
        {
            return new List<string>();
        }

        public virtual IEnumerable<string> GetMatchedPaths(string basePath)
        {
            return GetAvaliablePaths(basePath).Where(IsMatched);
        }

        public virtual CodeMetaData GetCodeMetaData(string filePath, string fileId, string memberId)
        {
            return null;
        }

        public virtual LocationIdentifier GetLocationIdentifier(string filePath, int lineId)
        {
            return null;
        }
    }
}
